#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
#include<stdlib.h>
int my_strcmp(char* str1, char* str2);
int main()
{
	char str1[] =  "abcde";
	char str2[] = "abc";
	int ret = my_strcmp(str1, str2);
	printf("   strcmp:%d\n", strcmp(str1,str2));
	printf("my_strcmp:%d\n", ret);
	return 0;
}
int my_strcmp(char* str1, char* str2)
{
	char* a = str1, * b = str2;
	while (*a && *b)
	{
		if (*a > *b)
			return  1;
		else if (*a < *b)
			return  -1;
		else
		{
			a++;
			b++;
		}
	}
	if (*a)
		return 1;
	else if (*b)
		return -1;
	else
		return 0;
}